
*****************************

**Regional Convergence Work, 4/30/2019**

log using welfare_federal_funding_4_30_2019_1

use "C:\Users\matt_zarit\Dropbox\Development Cycles in the American States (Krause & Zarit)\Zarit Findings\Datasets\Krause & Zarit Dataset_federalfunding.dta"


**GENERATE CUBIC SPLINE INTERPOLATED VALUES FOR "fed_welfare" VARIABLE BASED ON TIME FOR EACH CROSS-SECTIONAL UNIT **


by state_fips: csipolate fed_welfare year , generate(csi_fedwelfare)

by state_fips: csipolate federalfunding year, generate(csi_fedfund)


***Generate Real Welfare Spending***
gen csi_real_fedwelfare = csi_fedwelfare/nat_cpi_bls_ann

gen csi_real_fedfund = csi_fedfund/nat_cpi_bls_ann


***Regression to Generate Residuals for Including Federal Funding and Federal Welfare Spending**
reg real_pc_inc_ann csi_real_fedwelfare csi_real_fedfund

predict adjpercapita_resid,  resids


*** Correlation Among Original Income Per Capita Measure, Adjusted Per Capita Income Measure, Federal Revenue to States Measure, 
*** & Federal Welfare Funding Measure BY REGIONS

correlate  real_pc_inc_ann  adjpercapita_resid   csi_real_fedwelfare    csi_real_fedfund if nonsouth==1
*
correlate  real_pc_inc_ann  adjpercapita_resid   csi_real_fedwelfare    csi_real_fedfund if nonsouth==0
*
*
correlate  real_pc_inc_ann  adjpercapita_resid   csi_real_fedwelfare    csi_real_fedfund if newsouth==1
*
correlate  real_pc_inc_ann  adjpercapita_resid   csi_real_fedwelfare    csi_real_fedfund if oldsouth==1

*
*
*









save "C:\Users\matt_zarit\Dropbox\Development Cycles in the American States (Krause & Zarit)\Zarit Findings\Datasets\Krause & Zarit Dataset_federalfunding.newdata.dta"


log close
